Migrate Gentoo importer to advisory V2#2090
Migrate Gentoo importer to advisory V2#2090ziadhany wants to merge 8 commits intoaboutcode-org:mainfrom
Conversation
77f89b8 to
7ef7684
Compare
|
gentoo importer V2 logs: gentoo importer V1 logs: |
76f65a8 to
0bed9dd
Compare
4c5830d to
ca3fc16
Compare
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Update the Gentoo get_safe_and_affected_versions function in advisory v2 Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
76c1f80 to
a5e7bd4
Compare
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
keshav-space
left a comment
There was a problem hiding this comment.
@ziadhany Thanks, see some feedback below.
| cves = [] | ||
| summary = "" | ||
| xml_root = ET.parse(file).getroot() | ||
| id = xml_root.attrib.get("id") |
There was a problem hiding this comment.
| id = xml_root.attrib.get("id") | |
| id = xml_root.attrib.get("id", "") |
|
|
||
| affected_package = AffectedPackageV2( | ||
| package=purl, | ||
| affected_version_range=EbuildVersionRange(constraints=[constraint]), |
There was a problem hiding this comment.
It does not make sense to report unaffected range in affected_version_range.
| url=f"https://security.gentoo.org/glsa/{id}" | ||
| if id | ||
| else "https://security.gentoo.org/glsa", |
There was a problem hiding this comment.
This should suffice
| url=f"https://security.gentoo.org/glsa/{id}" | |
| if id | |
| else "https://security.gentoo.org/glsa", | |
| url=f"https://security.gentoo.org/glsa/{id}", |
| if invert: | ||
| constraint = constraint.invert() |
There was a problem hiding this comment.
@ziadhany why do we invert fixed range, we should report fixed range as is.
| { | ||
| "package": { | ||
| "type": "ebuild", | ||
| "namespace": "dev-vcs", | ||
| "name": "subversion", | ||
| "version": "", | ||
| "qualifiers": "", | ||
| "subpath": "" | ||
| }, | ||
| "affected_version_range": "vers:ebuild/<=1.8.18", | ||
| "fixed_version_range": null, | ||
| "introduced_by_commit_patches": [], | ||
| "fixed_by_commit_patches": [] | ||
| } |
There was a problem hiding this comment.
Not right, for the unaffected range <unaffected range="ge">1.9.7</unaffected> and <unaffected range="rgt">1.8.18</unaffected> we should report vers:ebuild/>1.8.18 and vers:ebuild/1.9.7 as fixed version range and do not invert these and report it as affected vers.
Issue: